package com.yyi.springcloud.controller;


import com.yyi.springcloud.entities.TestUnitNavigationInfoModel;
import com.yyi.springcloud.service.Local_TestUnitNavigationInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/mysqlapi/TestUnitNavigationInfo")
public class Mysql_TestUnitNavigationInfoController {

	@Resource
	private Local_TestUnitNavigationInfoService testUnitNavigationInfoService;

	//查询测试台位导航信息
	//http://localhost:8080/bxxs/mysqlapi/TestUnitNavigationInfo/getTestUnitNavigationInfo
	@ResponseBody
	@RequestMapping(value = "/getTestUnitNavigationInfo", method = RequestMethod.GET)
	public List<TestUnitNavigationInfoModel> getTestUnitNavigationInfo(String labcode) {
		TestUnitNavigationInfoModel testUnitNavigationInfoModel=new TestUnitNavigationInfoModel();
		if(!StringUtils.isEmpty(labcode)){
			testUnitNavigationInfoModel.setLabcode(labcode);
		}
		List<TestUnitNavigationInfoModel> testUnitNavigationInfoModelList = testUnitNavigationInfoService.getTestUnitNavigationInfoByCondition(testUnitNavigationInfoModel);
		return testUnitNavigationInfoModelList;
	}
}
